U.S. Patent Application Publication No. 2013/0329122 describes a direct-focus system that estimates, from a spectral signature of a first image captured with an arbitrary focus, the correction to apply to the lens to capture a sharp second image.
The system uses a statistical learning machine configured from numerous samples of spectral signatures produced for a variety of reference scenes placed at different distances from the lens and captured with multiple degrees of defocus.
Such a system may not be efficient for some types of scene.